package ${packageUrl}.base;

/**
 * 
 * @ClassName: BaseDto   
 * @Description:基础dto
 * @author: ${author}
 * @date:  ${date}
 */
import java.util.List;
public class BaseDto<T> {
	
	public class BaseDto<T> {
	
	private String id;
	
	/** 添加时间Bgn */
	private String createTimeBgn;
	
	/** 添加时间End */
	private String createTimeEnd; 
	
	/** 每页显示记录数 */
	private int pageSize = 15;
	
	/** 当前页码 */
	private int pageNo = 1;
	
	/** 总记录数 */
	private int totalRecords;
	
	/** 数据集 */
	private List<T> dataList;
	
	/** 获取分页查询开始位置 */
	public int getDataLimitStart() {
		return 0 + pageSize * (pageNo - 1);
	}
	
	/** 获取总页数 */
	public int getTotalPages() {
		return (totalRecords + pageSize - 1) / pageSize;
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCreateTimeBgn() {
		return createTimeBgn;
	}

	public void setCreateTimeBgn(String createTimeBgn) {
		this.createTimeBgn = createTimeBgn;
	}

	public String getCreateTimeEnd() {
		return createTimeEnd;
	}

	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getTotalRecords() {
		return totalRecords;
	}

	public void setTotalRecords(int totalRecords) {
		this.totalRecords = totalRecords;
	}

	public List<T> getDataList() {
		return dataList;
	}

	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}
	
}
